import { defineStore } from 'pinia'

export const useBottomNavStore = defineStore('bottomNav', () => {
  const activeIndex = ref(0)

  const updateActiveIndex = (payload) => {
    activeIndex.value = payload
  }

  const setActiveIndex = (index) => {
    activeIndex.value = index
  }

  return {
    activeIndex,
    updateActiveIndex,
    setActiveIndex,
  }
})

if (import.meta.hot)
  import.meta.hot.accept(acceptHMRUpdate(useBottomNavStore, import.meta.hot))
